/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author frazz
 */
@Entity
@Table(name = "puntate")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Puntate.findAll", query = "SELECT p FROM Puntate p"),
    @NamedQuery(name = "Puntate.findByIdpuntata", query = "SELECT p FROM Puntate p WHERE p.idpuntata = :idpuntata"),
    @NamedQuery(name = "Puntate.findByCifra", query = "SELECT p FROM Puntate p WHERE p.cifra = :cifra"),
    @NamedQuery(name = "Puntate.findByCliente", query = "SELECT p FROM Puntate p WHERE p.cliente = :cliente"),
    @NamedQuery(name = "Puntate.findByProdotto", query = "SELECT p FROM Puntate p WHERE p.prodotto = :prodotto")})
public class Puntate implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "idpuntata")
    private Integer idpuntata;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "cifra")
    private Double cifra;
    @Size(max = 45)
    @Column(name = "cliente")
    private String cliente;
    @Column(name = "prodotto")
    private Integer prodotto;

    public Puntate() {
    }

    public Puntate(Integer idpuntata) {
        this.idpuntata = idpuntata;
    }

    public Integer getIdpuntata() {
        return idpuntata;
    }

    public void setIdpuntata(Integer idpuntata) {
        this.idpuntata = idpuntata;
    }

    public Double getCifra() {
        return cifra;
    }

    public void setCifra(Double cifra) {
        this.cifra = cifra;
    }

    public String getCliente() {
        return cliente;
    }

    public void setCliente(String cliente) {
        this.cliente = cliente;
    }

    public Integer getProdotto() {
        return prodotto;
    }

    public void setProdotto(Integer prodotto) {
        this.prodotto = prodotto;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idpuntata != null ? idpuntata.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Puntate)) {
            return false;
        }
        Puntate other = (Puntate) object;
        if ((this.idpuntata == null && other.idpuntata != null) || (this.idpuntata != null && !this.idpuntata.equals(other.idpuntata))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.Puntate[ idpuntata=" + idpuntata + " ]";
    }
    
}
